package com.example.business.request;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.util.List;

public class SbOrderSaveRequest {
    @NotBlank(message = "收货地址不能为空")
    private String address;

    private String remark;

    @NotEmpty(message = "订单商品不能为空")
    private List<Item> items;

    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public List<Item> getItems() {
        return items;
    }
    public void setItems(List<Item> items) {
        this.items = items;
    }

    public static class Item {
        @NotNull(message = "商品SKU不能为空")
        private Long productSkuId;
        @NotNull(message = "商品数量不能为空")
        private Integer amount;

        public Long getProductSkuId() {
            return productSkuId;
        }
        public void setProductSkuId(Long productSkuId) {
            this.productSkuId = productSkuId;
        }
        public Integer getAmount() {
            return amount;
        }
        public void setAmount(Integer amount) {
            this.amount = amount;
        }
    }
} 